package com.itheima.Demo;


import com.itheima.config.SpringConfig;
import com.itheima.domain.User;
import com.itheima.service.UserService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.List;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes={SpringConfig.class})
public class test {
    @Autowired
public UserService userService;

    @Test
    public void test01(){
        List<User> all = userService.findAll();
        System.out.println(all);
    }

}
